package com.yanqu.road.logic.model.kowloon;

import com.yanqu.road.entity.config.skill.SkillInfo;
import com.yanqu.road.entity.config.system.NormalWeightItem;
import com.yanqu.road.entity.enums.eSkillType;
import com.yanqu.road.entity.kowloon.KowloonNpcAttributeData;
import com.yanqu.road.entity.kowloon.config.*;
import com.yanqu.road.entity.kowloon.enums.eKowloonBlockType;
import com.yanqu.road.entity.kowloon.enums.eKowloonNpcType;
import com.yanqu.road.entity.kowloon.sanxiao.KowloonBlock;
import com.yanqu.road.entity.kowloon.sanxiao.KowloonChooseHeroData;
import com.yanqu.road.logic.config.GameConfig;
import com.yanqu.road.logic.helper.WeightHelper;
import com.yanqu.road.utils.RandomHelper;
import com.yanqu.road.utils.string.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

public class KowloonConfig {

    private static Logger logger = LogManager.getLogger(KowloonConfig.class.getName());

    /**
     * 建筑配置 建筑id，等级，配置
     */
    private Map<Integer, Map<Integer, KowloonBuildingConfig>> buildingConfigMap = new ConcurrentHashMap<>();

    /**
     * 关卡配置 关卡id，等级，配置
     */
    private Map<Integer, Map<Integer, KowloonMissionRoadConfig>> missionRoadConfigMap = new ConcurrentHashMap<>();

    /**
     * npc配置 npc类型，npcId，npc等级，npc合成等级,配置
     */
    private Map<eKowloonNpcType, Map<Integer, Map<Integer, Map<Integer, KowloonNpcConfig>>>> npcConfigMap = new ConcurrentHashMap<>();
    /**
     * 消除引导配置 key:关卡id
     */
    private Map<Integer, KowloonEliminateGuideConfig> guideConfigMap = new ConcurrentHashMap<>();
    private int firstGuideMissionRoadId = 1001;
    private int secondGuideMissionRoadId = 1003;

    /**
     * 最大关卡id
     */
    private int maxChapterId;

    private Map<Integer, SkillInfo> kowloonSkillInfoMap = new ConcurrentHashMap<>();

    private RandomHelper randomHelper = new RandomHelper();

    public boolean initConfig(Map<Integer, Map<Integer, KowloonBuildingConfig>> buildingConfigMap, Map<Integer, Map<Integer, KowloonMissionRoadConfig>> missionRoadConfigMap, Map<eKowloonNpcType, Map<Integer, Map<Integer, Map<Integer, KowloonNpcConfig>>>> npcConfigMap, Map<Integer, SkillInfo> kowloonSkillInfoMap) {
        this.buildingConfigMap = buildingConfigMap;
        this.missionRoadConfigMap = missionRoadConfigMap;
        this.npcConfigMap = npcConfigMap;

        for (Integer chapterId : missionRoadConfigMap.keySet()) {
            maxChapterId = Math.max(maxChapterId, chapterId);
        }

        this.kowloonSkillInfoMap = kowloonSkillInfoMap;

        {
            KowloonEliminateGuideConfig guideConfig = new KowloonEliminateGuideConfig();
            String[] split = GameConfig.KOWLOON_GUIDE_INIT_CARD_1.split("=");
            Integer missionRoadId = Integer.valueOf(split[0]);
            List<Integer> colors = StringUtils.stringToIntegerList(split[1], ",");
            guideConfig.setMissionRoadId(missionRoadId);
            guideConfig.setColors(colors);

            split = GameConfig.KOWLOON_GUIDE_DROP_1.split("\\|");
            for (String colorsStr : split) {
                List<Integer> dropColors = StringUtils.stringToIntegerList(colorsStr, ",");
                guideConfig.getDropColorList().add(dropColors);
            }

            split = GameConfig.KOWLOON_GUIDE_OPERATE_1.split("\\|");
            for (String opStr : split) {
                List<Integer> operateAttr = StringUtils.stringToIntegerList(opStr, ",");
                guideConfig.getOperateList().add(operateAttr);
            }
            this.guideConfigMap.put(guideConfig.getMissionRoadId(), guideConfig);
            this.firstGuideMissionRoadId = guideConfig.getMissionRoadId();
        }

        {
            KowloonEliminateGuideConfig guideConfig = new KowloonEliminateGuideConfig();
            String[] split = GameConfig.KOWLOON_GUIDE_INIT_CARD_2.split("=");
            Integer missionRoadId = Integer.valueOf(split[0]);
            List<Integer> colors = StringUtils.stringToIntegerList(split[1], ",");
            guideConfig.setMissionRoadId(missionRoadId);
            guideConfig.setColors(colors);

            split = GameConfig.KOWLOON_GUIDE_DROP_2.split("\\|");
            for (String colorsStr : split) {
                List<Integer> dropColors = StringUtils.stringToIntegerList(colorsStr, ",");
                guideConfig.getDropColorList().add(dropColors);
            }

            split = GameConfig.KOWLOON_GUIDE_OPERATE_2.split("\\|");
            for (String opStr : split) {
                List<Integer> operateAttr = StringUtils.stringToIntegerList(opStr, ",");
                guideConfig.getOperateList().add(operateAttr);
            }
            this.guideConfigMap.put(guideConfig.getMissionRoadId(), guideConfig);
            this.secondGuideMissionRoadId = guideConfig.getMissionRoadId();
        }

        heroElementMap = new HashMap<>();
        List<String> list = StringUtils.stringToStringList(GameConfig.KOWLOON_HERO_ELEMENT_LIST, "\\|");
        for (String s : list) {
            String[] split = s.split("=");
            heroElementMap.put(Integer.parseInt(split[0]), Integer.parseInt(split[1]));
        }


        return true;
    }

    public Map<Integer, SkillInfo> getKowloonSkillInfoMap() {
        return kowloonSkillInfoMap;
    }

    public void setKowloonSkillInfoMap(Map<Integer, SkillInfo> kowloonSkillInfoMap) {
        this.kowloonSkillInfoMap = kowloonSkillInfoMap;
    }

    public void setBuildingConfigMap(Map<Integer, Map<Integer, KowloonBuildingConfig>> buildingConfigMap) {
        this.buildingConfigMap = buildingConfigMap;
    }

    public void setMissionRoadConfigMap(Map<Integer, Map<Integer, KowloonMissionRoadConfig>> missionRoadConfigMap) {
        this.missionRoadConfigMap = missionRoadConfigMap;
    }

    public void setNpcConfigMap(Map<eKowloonNpcType, Map<Integer, Map<Integer, Map<Integer, KowloonNpcConfig>>>> npcConfigMap) {
        this.npcConfigMap = npcConfigMap;
    }

    public final static int ELIMINATE_WIDTH = 6;
    public final static int ELIMINATE_HEIGHT = 6;

    public int getInitSectionId() {
        // 初始波次
        return 1;
    }

    public final static int ELEMENT_NUM = 5;//盘面最少5种元素

    public final static int BATTLE_HERO_COUNT = 4; // 最多上阵好汉数量

    /**
     * 一格固定100像素,格子大小
     */
    public final static double TILE_SIZE = 100;

    /**
     * 每帧的时间，暂定1秒30帧
     */
    public final static double FRAME_TIME = 0.033;

    /**
     * 最宽像素
     */
    public final static double BATTLE_WIDTH_PIXEL = 800;

    /**
     * 最高像素
     */
    public final static double BATTLE_HEIGHT_PIXEL = 1800;

    /**
     * 摊位所在像素
     */
    public final static double BOOTH_PIXEL = -50;


    public final static int BASE_ELEMENT_COUNT = 4;

    /**
     * 好汉默认位置
     * 需要处理老数据，这里只能写死了
     */
    public final static Map<Integer,Integer> DEFAULT_HERO_IDX_MAP = new HashMap<Integer, Integer>() {{
        put(1001, 0);
        put(1002, 1);
        put(1003, 2);
        put(1004, 3);
    }};

    /**
     * 诈尸后范围
     */
    public final static int[][] DEAD_DIRS = new int[][]{{-1, 1}, {0, 1}, {1, 1}, {-1, 0}, {1, 0}, {-1, -1}, {0, -1}, {1, -1}};

    /**
     * 闪现范围
     */
    public final static int[][] FLASH_DIRS = new int[][]{{-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}};

    /**
     * 获取建筑配置
     *
     * @param building 建筑id
     * @param level    等级
     */
    public KowloonBuildingConfig getKowloonBuildingConfig(int building, int level) {
        if (!buildingConfigMap.containsKey(building)) {
            return null;
        }
        if (!buildingConfigMap.get(building).containsKey(level)) {
            return null;
        }
        return buildingConfigMap.get(building).get(level);
    }

    /**
     * 获取关卡配置
     *
     * @param chapterId 关卡id
     */
    public KowloonMissionRoadConfig getKowloonMissionRoadConfig(int chapterId) {
        return getKowloonMissionRoadConfig(chapterId, 0);
    }



    /**
     * 获取关卡配置
     *
     * @param chapterId 关卡id
     * @param sectionId 波次
     */
    public KowloonMissionRoadConfig getKowloonMissionRoadConfig(int chapterId, int sectionId) {
        if (!missionRoadConfigMap.containsKey(chapterId)) {
            return null;
        }
        if (!missionRoadConfigMap.get(chapterId).containsKey(sectionId)) {
            return null;
        }
        return missionRoadConfigMap.get(chapterId).get(sectionId);
    }

    /**
     * 获取初始的关卡id
     */
    public int getInitChapterId() {
        int initChapterId = Integer.MAX_VALUE;
        for (Integer chapterId : missionRoadConfigMap.keySet()) {
            initChapterId = Math.min(initChapterId, chapterId);
        }
        return initChapterId;
    }


    /**
     * 获取好汉配置
     *
     * @param heroId 好汉id
     * @param level  等级
     */
    public KowloonNpcConfig getKowloonHeroConfig(int heroId, int level) {
        return getKowloonHeroConfig(heroId, level, 1);
    }

    /**
     * 获取好汉配置
     *
     * @param heroId     好汉id
     * @param level      等级
     * @param mergeLevel 合成等级
     */
    public KowloonNpcConfig getKowloonHeroConfig(int heroId, int level, int mergeLevel) {
        return getKowloonNpcConfig(eKowloonNpcType.Hero, heroId, level, mergeLevel);
    }

    /**
     * 获取地痞配置
     *
     * @param ruffianId ruffianId
     */
    public KowloonNpcConfig getKowloonRuffianConfig(int ruffianId) {
        return getKowloonNpcConfig(eKowloonNpcType.Ruffian, ruffianId);
    }


    /**
     * 获取boss配置
     *
     * @param boosId bossId
     */
    public KowloonNpcConfig getKowloonBossConfig(int boosId) {
        return getKowloonNpcConfig(eKowloonNpcType.Boss, boosId);
    }

    /**
     * 获取敌人配置
     * 不是boss就是地痞
     */
    public KowloonNpcConfig getKowloonEnemyConfig(int enemyId) {
        KowloonNpcConfig enemyConfig = getKowloonRuffianConfig(enemyId);
        if (enemyConfig == null) {
            enemyConfig = getKowloonBossConfig(enemyId);
        }
        return enemyConfig;
    }


    /**
     * 获取npc配置
     */
    public KowloonNpcConfig getKowloonNpcConfig(eKowloonNpcType npcType, int npcId, int level, int mergeLevel) {
        if (!npcConfigMap.containsKey(npcType)) {
            return null;
        }
        if (!npcConfigMap.get(npcType).containsKey(npcId)) {
            return null;
        }
        if (!npcConfigMap.get(npcType).get(npcId).containsKey(level)) {
            return null;
        }
        return npcConfigMap.get(npcType).get(npcId).get(level).get(mergeLevel);
    }

    /**
     * 获取npc配置
     */
    public KowloonNpcConfig getKowloonNpcConfig(eKowloonNpcType npcType, int npcId) {
        return getKowloonNpcConfig(npcType, npcId, 0, 0);
    }


    public Map<Integer, Map<Integer, KowloonBuildingConfig>> getBuildingConfigMap() {
        return buildingConfigMap;
    }

    public Map<Integer, Map<Integer, KowloonMissionRoadConfig>> getMissionRoadConfigMap() {
        return missionRoadConfigMap;
    }

    public Map<eKowloonNpcType, Map<Integer, Map<Integer, Map<Integer, KowloonNpcConfig>>>> getNpcConfigMap() {
        return npcConfigMap;
    }


    /**
     * 技能池随机三个技能出来用
     *
     * @param chapterId
     * @param sectionId
     * @param skillLevel
     * @param notIncludeSkillId
     * @param needNum
     * @param heroList
     * @param chooseElementList
     * @return
     */
    public List<Integer> randomSkillList(int chapterId, int sectionId, int skillLevel, List<Integer> notIncludeSkillId, int needNum, List<NormalWeightItem> heroList, List<Integer> chooseElementList) {
        List<Integer> list = new ArrayList<>();
        KowloonMissionRoadConfig kowloonMissionRoadConfig = getKowloonMissionRoadConfig(chapterId, sectionId);
        if (null == kowloonMissionRoadConfig) {
            return list;
        }
        List<NormalWeightItem> randomSkillList = kowloonMissionRoadConfig.getHighSkillsList();
        if (skillLevel == 1) {
            randomSkillList = kowloonMissionRoadConfig.getJuniorSkillsList();
        } else if (skillLevel == 2) {
            randomSkillList = kowloonMissionRoadConfig.getMiddleSkillsList();
        } else if (skillLevel == 3) {
            randomSkillList = kowloonMissionRoadConfig.getHighSkillsList();
        }
        // 好汉技能
        randomSkillList.addAll(heroList);
        for (int i = 0; i < 1000; i++) {
            if (list.size() >= needNum) {
                break;
            }
            NormalWeightItem randomResult = WeightHelper.getRandomResult(randomSkillList, notIncludeSkillId);
            if (null != randomResult) {
                int skillId = randomResult.getValue().intValue();
                // 判断下技能是否转换
                skillId = replaceKowloonSkill(chooseElementList, skillId);
                if (skillId == -1) {
//                    logger.error("config error,kowloon skill not change");
                    continue;
                }
                if (!kowloonSkillInfoMap.containsKey(skillId)) {
//                    logger.error("config error,kowloon skill not found,skillId:{}", skillId);
                    continue;
                }
                if (!list.contains(skillId) && !notIncludeSkillId.contains(skillId)) {
                    list.add(skillId);
                    notIncludeSkillId.add(skillId);
                }
            }
        }
        return list;
    }

    /**
     * 替换技能
     */
    private int replaceKowloonSkill(List<Integer> chooseElementList, int skillId) {
        SkillInfo skillInfo = kowloonSkillInfoMap.get(skillId);
        if (skillInfo == null) {
            return skillId;
        }
        if (skillInfo.getType() == eSkillType.KowloonSkill196.getValue() || skillInfo.getType() == eSkillType.KowloonSkill197.getValue()) {
            // 找不到元素不转了
            if (chooseElementList.size() == 0) {
                return -1;
            }
            // 转换为对应的元素技能=>196转175  197转176
            // 随机一个元素
            Integer elementId = chooseElementList.get(randomHelper.next(0, chooseElementList.size()));
            // 转换对应的技能
            int changeSkillId = -1;
            if (skillInfo.getType() == eSkillType.KowloonSkill196.getValue()) {
                changeSkillId = getSkillIdByTypeAndElementId(eSkillType.KowloonSkill175.getValue(), elementId);
            } else if (skillInfo.getType() == eSkillType.KowloonSkill197.getValue()) {
                changeSkillId = getSkillIdByTypeAndElementId(eSkillType.KowloonSkill176.getValue(), elementId);
            }
            return changeSkillId;
        }
        return skillId;
    }

    public int getSkillIdByTypeAndElementId(int skillType, int elementId) {
        for (SkillInfo skillInfo : kowloonSkillInfoMap.values()) {
            if (skillInfo.getType() != skillType) {
                continue;
            }
            if (skillInfo.getParamList().get(3) == elementId) {
                return skillInfo.getId();
            }
        }
        return -1;
    }

    /**
     * 得到掉落权重
     */
    public List<Integer> getDropElementWeightList(int chapterId, int sectionId){
        List<Integer> list = new ArrayList<>();
        KowloonMissionRoadConfig kowloonMissionRoadConfig = getKowloonMissionRoadConfig(chapterId, sectionId);
        if (null == kowloonMissionRoadConfig) {
            return list;
        }
        list.addAll(kowloonMissionRoadConfig.getElementWeights());

        Collections.shuffle(list);

        list.add(kowloonMissionRoadConfig.getSilverIngotWeights());

        return list;
    }

    /**
     * 获取下一个关卡id
     */
    public KowloonMissionRoadConfig getNextMissionRoadConfig(int chapterId) {
        // 通关了
        if (chapterId >= maxChapterId) {
            return null;
        }
        for (int i = chapterId + 1; i <= maxChapterId; i++) {
            KowloonMissionRoadConfig missionRoadConfig = getKowloonMissionRoadConfig(i, getInitSectionId());
            if (missionRoadConfig != null) {
                return missionRoadConfig;
            }
        }
        return null;
    }

    /**
     * 获取某个关卡最大波次
     */
    public int getMaxSectionId(int chapterId) {
        int maxSectionId = 0;
        Map<Integer, KowloonMissionRoadConfig> waveMap = missionRoadConfigMap.get(chapterId);
        for (Integer sectionId : waveMap.keySet()) {
            maxSectionId = Math.max(maxSectionId, sectionId);
        }
        return maxSectionId;
    }

    /**
     * 获取好汉最大合成等级
     *
     * @param heroId 好汉id
     * @param level  好汉等级
     */
    public int getMaxMergeLevel(int heroId, int level) {
        if (!npcConfigMap.containsKey(eKowloonNpcType.Hero)) {
            return 0;
        }
        if (!npcConfigMap.get(eKowloonNpcType.Hero).containsKey(heroId)) {
            return 0;
        }
        if (!npcConfigMap.get(eKowloonNpcType.Hero).get(heroId).containsKey(level)) {
            return 0;
        }
        int maxLevel = 0;
        for (Integer mergeLevel : npcConfigMap.get(eKowloonNpcType.Hero).get(heroId).get(level).keySet()) {
            maxLevel = Math.max(maxLevel, mergeLevel);
        }
        return maxLevel;
    }

    /**
     * 获取连消步数加成
     */
    public int getEliminateAmountStepAdd(int count) {
        List<String> list = StringUtils.stringToStringList(GameConfig.KOWLOON_MATCH_STEP_ADD, "\\|");
        for (String s : list) {
            String[] split = s.split(";");
            if (count == Integer.parseInt(split[0])) {
                return Integer.parseInt(split[1]);
            }
        }
        return 0;
    }

    /**
     * 计算好汉属性
     */
    public  KowloonNpcAttributeData calcHeroAttribute(int heroId, int level) {
        return calcHeroAttribute(heroId, level, 1);
    }

    /**
     * 计算好汉属性
     * 基础属性，加成另算
     */
    public KowloonNpcAttributeData calcHeroAttribute(int heroId, int level, int mergeLevel) {
        KowloonNpcAttributeData attributeData = new KowloonNpcAttributeData();
        KowloonNpcConfig heroConfig = getKowloonHeroConfig(heroId, level, mergeLevel);
        if (heroConfig == null) {
            return attributeData;
        }
        KowloonNpcAttributeConfig npcAttribute = heroConfig.getNpcAttribute();
        // 基础属性
        attributeData.setAttack(npcAttribute.getAtk());
        // 其他属性
        attributeData.setAtkSpeed(npcAttribute.getAtkSpeed());
        attributeData.setAttackRange(npcAttribute.getAttackRange().clone());
        attributeData.setHitRange(npcAttribute.getHitRange().clone());
        attributeData.setMoveSpeed(npcAttribute.getMoveSpeed());
        attributeData.setBullet(npcAttribute.getBullet());
        attributeData.setAttackNum(npcAttribute.getAttackNum());
        attributeData.setSlowBuff(npcAttribute.getSlowParam().clone());
        attributeData.setFreezeBuff(npcAttribute.getFreezeParam().clone());
        attributeData.setBleedingBuff(npcAttribute.getBleedingParam().clone());
        attributeData.setVertigoBuff(npcAttribute.getVertigoParam().clone());
        attributeData.setEjectionRange(npcAttribute.getEjectionRange());
        attributeData.setWeaponRadius(npcAttribute.getWeaponRadius());
        attributeData.setBeatBackBuff(npcAttribute.getBeatBackParam().clone());
        attributeData.setAtkBuff(npcAttribute.getAtkBuffParam().clone());
        attributeData.setThunderBuff(npcAttribute.getThunderBuffParam().clone());
        return attributeData;
    }

    /**
     * 获取元素对应的好汉
     *
     * @param heroId 好汉id
     */
    public int getElementIdByHero(int heroId) {
        return heroElementMap.getOrDefault(heroId, -1);
    }

    /**
     * 新手引导的关卡
     */
    public KowloonMissionRoadConfig getGuideMissionRoadConfig() {
        return getKowloonMissionRoadConfig(1003, 1);
//        return getKowloonMissionRoadConfig(1001, 1);
    }

    private static Map<Integer, Integer> heroElementMap = new HashMap<>();

    public static Map<Integer, Integer> getHeroElementMap() {
        return heroElementMap;
    }

    /**
     * TODO
     * @param heroElementMap
     */
    public static void setHeroElementMap(Map<Integer, Integer> heroElementMap) {
        KowloonConfig.heroElementMap = heroElementMap;
    }

    /**
     * 根据颜色获取元素
     */
    public static int getTypeByColor(List<KowloonChooseHeroData> heroDataList, int color) {
        if (color == 1) {
            return heroElementMap.get(heroDataList.get(0).getHeroId());
        } else if (color == 2) {
            return heroElementMap.get(heroDataList.get(1).getHeroId());
        } else if (color == 3) {
            return heroElementMap.get(heroDataList.get(2).getHeroId());
        } else if (color == 4) {
            return heroElementMap.get(heroDataList.get(3).getHeroId());
        } else {
            return eKowloonBlockType.Silver.getValue();
        }
    }

    /**
     * 获取新手引导盘面
     */
    public static List<List<KowloonBlock>> getGuideBlockList(List<KowloonChooseHeroData> chooseHeroDataList, List<Integer> colors) {
        List<List<KowloonBlock>> blockListList = new ArrayList<>();
        for (int i = 0; i < colors.size(); i++) {
            int color = colors.get(i);
            int y = i / ELIMINATE_WIDTH;
            if (blockListList.size() <= y) {
                blockListList.add(new ArrayList<>());
            }
            int blockType = getTypeByColor(chooseHeroDataList, color);
            KowloonBlock block = new KowloonBlock(0, 0, blockType);
            block.setColor(color);
            blockListList.get(y).add(block);
        }

        Collections.reverse(blockListList);

        for (int y = 0; y < blockListList.size(); y++) {
            for (int x = 0; x < blockListList.get(y).size(); x++) {
                KowloonBlock block = blockListList.get(y).get(x);
                block.setY(y);
                block.setX(x);
            }
        }

        return blockListList;
    }

    /**
     * 获取新手引导盘面
     */
    public List<List<KowloonBlock>> getGuideBlockList(List<KowloonChooseHeroData> chooseHeroDataList) {
//        int[][] gridArry = {
//                {3, 4, 2, 2, 1, 2},
//                {1, 4, 3, 4, 2, 5},
//                {1, 1, 2, 4, 4, 3},
//                {5, 3, 2, 1, 1, 5},
//                {5, 4, 1, 2, 4, 4},
//                {4, 2, 3, 3, 1, 5},
//        };
        int[][] gridArry = {
                {2, 3, 4, 5, 4, 4},
                {2, 5, 1, 5, 1, 1},
                {1, 4, 4, 2, 4, 4},
                {2, 3, 3, 4, 3, 1},
                {2, 4, 5, 2, 2, 3},
                {1, 5, 5, 3, 1, 3},
        };
        List<List<KowloonBlock>> listList = new ArrayList<>();
        for (int y = 0; y < gridArry.length; y++) {
            listList.add(new ArrayList<>());
            for (int x = 0; x < gridArry[y].length; x++) {
                int color = gridArry[y][x];
                int blockType = getTypeByColor(chooseHeroDataList, color);
                KowloonBlock block = new KowloonBlock(x, gridArry.length - 1 - y, blockType);
                block.setColor(color);
                listList.get(y).add(block);
            }
        }
        Collections.reverse(listList);

        return listList;
    }

    /**
     * 获取新手引导的掉落
     */
    public List<Integer> getGuideDrop(int missionRoadId, int no) {
        KowloonEliminateGuideConfig guideConfig = guideConfigMap.get(missionRoadId);
        if (null == guideConfig) {
            return new ArrayList<>();
        }
        if (no > guideConfig.getDropColorList().size() || no <= 0) {
            return new ArrayList<>();
        }
        return new ArrayList<>(guideConfig.getDropColorList().get(no - 1));
    }

    public Map<Integer, KowloonEliminateGuideConfig> getGuideConfigMap() {
        return guideConfigMap;
    }

    public int getFirstGuideMissionRoadId() {
        return firstGuideMissionRoadId;
    }

    public int getSecondGuideMissionRoadId() {
        return secondGuideMissionRoadId;
    }
}
